package com.loadburn.heron.render.adapter;

import com.google.inject.Provider;
import com.loadburn.heron.bind.Request;
import com.loadburn.heron.bind.Response;
import com.loadburn.heron.render.Rendering;
import com.loadburn.heron.template.TemplateLoader;
import org.mvel2.templates.CompiledTemplate;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author slacrey (scstlinfeng@yahoo.com)
 *         Date: 13-12-27
 */
public abstract class AbstractRendering implements Rendering {

    protected final Provider<Request<String>> requestProvider;
    protected final Provider<Response> responseProvider;

    protected final Provider<HttpServletRequest> servletRequestProvider;
    protected final Provider<HttpServletResponse> servletResponseProvider;

    protected final CompiledTemplate compiledTemplate;
    protected final TemplateLoader.TemplatePage templatePage;

    public AbstractRendering(Provider<Request<String>> requestProvider, Provider<Response> responseProvider,
                             Provider<HttpServletRequest> servletRequestProvider, Provider<HttpServletResponse> servletResponseProvider,
                             CompiledTemplate compiledTemplate, TemplateLoader.TemplatePage templatePage) {
        this.requestProvider = requestProvider;
        this.responseProvider = responseProvider;
        this.servletRequestProvider = servletRequestProvider;
        this.servletResponseProvider = servletResponseProvider;
        this.compiledTemplate = compiledTemplate;
        this.templatePage = templatePage;
    }




}
